<template>
  <!-- 带电检测 -->
  <div>
    <div class="container">
      <div class="container-top">
        <div class="back" @click="goBack"></div>
      </div>
      <div class="head">
        <ChargeHead />
      </div>
      <div class="center borderStyle centerbox relative">
        <div
          class="title centertitleStyle centerbox title-relative"
          @click="titleClick('在线监测异常装置分布')"
        >检测设备按地市分布</div>
        <ChargeCenter :dataList="dataList" :xAxisData="xAxisData" />
      </div>
      <!-- <div class="center centerbox borderStyle">
      <ChargeCenter />
      </div>-->
      <div class="bottom borderStyle centerbox relative">
        <div
          class="title centertitleStyle centerbox title-relative"
          @click="titleClick('具体记录')"
        >具体记录</div>
        <ChargeBottom />
      </div>
    </div>
  </div>
</template>

<script lang="ts">
import { Component, Vue } from "vue-property-decorator";
import { EChartOption } from "echarts";
import ChargeHead from "../../commponents/ChargeHead/index.vue";
import ChargeCenter from "../../commponents/ChargeCenter/index.vue";
import ChargeBottom from "../../commponents/ChargeBottom/index.vue";
@Component({
  components: {
    ChargeHead,
    ChargeCenter,
    ChargeBottom,
  },
})
export default class WarningToSolve extends Vue {
  //传图表得数据
  public xAxisData: any = [
    "红外测温",
    "GIS超声",
    "GIS特高频",
    "开关柜超声",
    "开关柜暂芯地电压",
  ];
  public dataList: any = [
    {
      name: "宁波",
      total: 400,
      early: 300,
      onLine: 200,
      soice: 100,
      flash: 500,
    },
    {
      name: "长圆",
      total: 400,
      early: 300,
      onLine: 200,
      soice: 100,
      flash: 500,
    },
    {
      name: "西安",
      total: 400,
      early: 300,
      onLine: 200,
      soice: 100,
      flash: 500,
    },
    {
      name: "保定",
      total: 400,
      early: 300,
      onLine: 200,
      soice: 100,
      flash: 500,
    },
    {
      name: "山东",
      total: 400,
      early: 300,
      onLine: 200,
      soice: 100,
      flash: 500,
    },
    {
      name: "未知",
      total: 400,
      early: 300,
      onLine: 200,
      soice: 100,
      flash: 500,
    },
    {
      name: "宁波",
      total: 400,
      early: 300,
      onLine: 200,
      soice: 100,
      flash: 500,
    },
    {
      name: "长圆",
      total: 400,
      early: 300,
      onLine: 200,
      soice: 100,
      flash: 500,
    },
    {
      name: "西安",
      total: 400,
      early: 300,
      onLine: 200,
      soice: 100,
      flash: 500,
    },
    {
      name: "保定",
      total: 400,
      early: 300,
      onLine: 200,
      soice: 100,
      flash: 500,
    },
    {
      name: "山东",
      total: 400,
      early: 300,
      onLine: 200,
      soice: 100,
      flash: 500,
    },
    {
      name: "未知",
      total: 400,
      early: 300,
      onLine: 200,
      soice: 100,
      flash: 500,
    },
  ];
  // 返回按钮
  private goBack(val: string) {
    window.history.back();
    // this.$router.push("index");
  }
}
</script>

<style lang='scss' scoped>
.container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0 0.24rem 0.24rem 0.24rem;
  &-top {
    width: 100%;
    // height: 2%;
    // background-color: pink;
    display: flex;
    align-items: center;
    .back {
      width: 0.9rem;
      height: 0.31rem;
      margin-left: auto;
      background-image: url("../../../../assets/img/return.png");
      background-size: 100% 100%;
      background-repeat: no-repeat;
      background-position: center;
    }
  }
  .head {
    width: 100%;
    height: 10%;
    // background-color: grey;
    // margin-bottom: 0.29rem;
  }
  .center {
    width: 100%;
    height: 25%;
    padding-top: 1%;
    // background-color: pink;
    margin-top: 0.1rem;
  }
  .bottom {
    width: 100%;
    height: 50%;
    // background-color: rgb(179, 245, 177);
  }
}
</style>
